package oppsa.controller;
//Variables
public class Column 
{
	private String id;
	private int index;
	private String name;
	private int size;
	
	public Column(String id, int index, String name, int size)
	{
		this.id = id;
		this.index = index;
		this.name = name;
		this.size = size;
	}
	
	public Column(Column cl)
	{
		this.id = cl.id;
		this.index = cl.index;
		this.name = cl.name;
		this.size = cl.size;
	}
	
	public Column()
	{
		this.id = "";
		this.index = 0;
		this.name = "";
		this.size = 0;
	}
	
	//Getters & Setters
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public int getIndex() {
		return index;
	}
	public void setIndex(int index) {
		this.index = index;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public void update(String id, int index, String name, int size)
	{
		this.id = id;
		this.index = index;
		this.name = name;
		this.size =size;
	}
	
	public void update(Column cl)
	{
		this.id = cl.id;
		this.index = cl.index;
		this.name = cl.name;
		this.size =cl.size;
	}
	
	public boolean compare(Column cl)
	{
		if (cl.id==this.id)
		{
			if (cl.index==this.index)
			{ 
					return true;
			}
		}
		return false;
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}
}